package org.smart4j.framework.dwtest.simplproxy;

/**
 * Created by
 *
 * 静态代理
 * @author dw
 * @date 2018/01/24
 */
public class HelloProxy implements Hello {
    private Hello hello;

    public HelloProxy() {
        hello = new HelloImp();
    }

    @Override
    public void say() {
        before();
        hello.say();
        end();
    }

    private void before() {
        System.out.println(1);
    }

    private void end() {
        System.out.println(2);
    }
}
